﻿using NHibernate;
using NHibernate.Linq;
using Shape.Mvp.Sample.Conversations.Domain.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shape.Mvp.Sample.Conversations.Domain.Repositories
{
	public class CakeRepository : IRepository<Cake>
	{
		private readonly ISessionFactory _sessionFactory;

		public CakeRepository(ISessionFactory sessionFactory)
		{
			_sessionFactory = sessionFactory;
		}

		public ICollection<Cake> GetAll()
		{
			return _sessionFactory.GetCurrentSession().Query<Cake>().ToList();
		}

		public Cake GetById(Guid id)
		{
			throw new NotImplementedException();
		}
	}
}
